package cn.net.sinodata.threadpool.processor;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * Description: Test01线程池业务处理类
 *
 * @author: yinliangyun
 * @date: 2021-5-19
 */
@Slf4j
@Component
public class Test01Processor {

	public void processTask(String threadPoolName) {

		long start = System.currentTimeMillis();
		try {
			Thread.sleep(2000);
			log.info("sleep 2000 : {}", threadPoolName + start);
		} catch (InterruptedException e) {
			log.error("InterruptedException", e);
		}
		log.info("processTask execute start : {}", threadPoolName);

	}

}
